package com.newly.api.auth.feign;

import com.newly.common.base.constants.ServerUriConstant;
import com.newly.common.base.entity.R;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.security.core.Authentication;
import org.springframework.web.bind.annotation.PostMapping;

/**
 * @author gjm guan
 * @date 2021/8/19 14:02
 * @desc 鉴权接口
 */
@Api(tags = "鉴权api")
@FeignClient(path = ServerUriConstant.NEWLY_AUTH, name = ServerUriConstant.NEWLY_AUTH_SERVICE_NAME)
public interface AuthClient {

    @ApiOperation("解析token")
    @PostMapping("/parseToken")
    R parseToken(Authentication authentication);
}
